package 静态内部类;

class OutClass{
    public int a=1;
    private int b=2;
    public static int c=4;
    static class InnerClass{
        public int a1=2;
        private int b1=6;
        public static int c1=8;
        public void test(){
            OutClass outClass=new OutClass();
            System.out.println("test被执行了");
//            System.out.println(a);不能直接访问外部类非静态的成员
            System.out.println(outClass.a);
            System.out.println(c);
        }
    }
}
public class Test {
    public static void main(String[] args) {
//        如何实例话一个静态内部类对象
        OutClass.InnerClass innerClass=new OutClass.InnerClass();
        innerClass.test();
    }
}
